Merge pull request #7 from syncthing/ping
Server should respond to ping
This commit is contained in:
commit
61f8fdd9e8
|
@ -161,6 +161,15 @@ func protocolConnectionHandler(tcpConn net.Conn, config *tls.Config) {
|
||||||
}
|
}
|
||||||
conn.Close()
|
conn.Close()
|
||||||
|
|
||||||
|
case protocol.Ping:
|
||||||
|
if err := protocol.WriteMessage(conn, protocol.Pong{}); err != nil {
|
||||||
|
if debug {
|
||||||
|
log.Println("Error writing pong:", err)
|
||||||
|
}
|
||||||
|
conn.Close()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
case protocol.Pong:
|
case protocol.Pong:
|
||||||
// Nothing
|
// Nothing
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user