Browse Source

fix(net): fix return type for `send_tcp`

Was `.Connection_Closed` but this is only inferrable if our return type
is not a sub-union of another.
Rickard Andersson 1 year ago
parent
commit
68f663ea85
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/net/socket_linux.odin

+ 1 - 1
core/net/socket_linux.odin

@@ -262,7 +262,7 @@ _send_tcp :: proc(tcp_sock: TCP_Socket, buf: []byte) -> (int, Network_Error) {
 		if errno == .EPIPE {
 		if errno == .EPIPE {
 			// If the peer is disconnected when we are trying to send we will get an `EPIPE` error,
 			// If the peer is disconnected when we are trying to send we will get an `EPIPE` error,
 			// so we turn that into a clearer error
 			// so we turn that into a clearer error
-			return total_written, .Connection_Closed
+			return total_written, TCP_Send_Error.Connection_Closed
 		} else if errno != .NONE {
 		} else if errno != .NONE {
 			return total_written, TCP_Send_Error(errno)
 			return total_written, TCP_Send_Error(errno)
 		}
 		}