MCPcopy Create free account
hub / github.com/tendermint/tendermint / waitForClose

Method waitForClose

abci/server/socket_server.go:136–152  ·  view source on GitHub ↗
(closeConn chan error, connID int)

Source from the content-addressed store, hash-verified

134}
135
136func (s *SocketServer) waitForClose(closeConn chan error, connID int) {
137 err := <-closeConn
138 switch {
139 case err == io.EOF:
140 s.Logger.Error("Connection was closed by client")
141 case err != nil:
142 s.Logger.Error("Connection error", "err", err)
143 default:
144 // never happens
145 s.Logger.Error("Connection was closed")
146 }
147
148 // Close the connection
149 if err := s.rmConn(connID); err != nil {
150 s.Logger.Error("Error closing connection", "err", err)
151 }
152}
153
154// Read requests from conn and deal with them
155func (s *SocketServer) handleRequests(closeConn chan error, conn io.Reader, responses chan<- *types.Response) {

Callers 1

Calls 2

rmConnMethod · 0.95
ErrorMethod · 0.65

Tested by

no test coverage detected