diff options
Diffstat (limited to 'libjava/java/net/Socket.java')
-rw-r--r-- | libjava/java/net/Socket.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index bebd73d..8d35fe3 100644 --- a/libjava/java/net/Socket.java +++ b/libjava/java/net/Socket.java @@ -520,14 +520,14 @@ public class Socket /** * Returns the port number of the remote end of the socket connection. If - * this socket is not connected, then -1 is returned. + * this socket is not connected, then 0 is returned. * * @return The remote port this socket is connected to */ public int getPort() { if (! isConnected()) - return -1; + return 0; try { |