|
41 | 41 | package com.oracle.graal.python.builtins.objects.socket;
|
42 | 42 |
|
43 | 43 | import java.io.IOException;
|
44 |
| -import java.net.*; |
| 44 | +import java.net.InetAddress; |
| 45 | +import java.net.InetSocketAddress; |
| 46 | +import java.net.SocketAddress; |
| 47 | +import java.net.SocketException; |
45 | 48 | import java.nio.ByteBuffer;
|
46 | 49 | import java.nio.channels.ServerSocketChannel;
|
47 | 50 | import java.nio.channels.SocketChannel;
|
|
57 | 60 | import com.oracle.graal.python.builtins.objects.bytes.PByteArray;
|
58 | 61 | import com.oracle.graal.python.builtins.objects.bytes.PBytes;
|
59 | 62 | import com.oracle.graal.python.builtins.objects.bytes.PIBytesLike;
|
60 |
| -import com.oracle.graal.python.builtins.objects.exception.OSErrorEnum; |
61 | 63 | import com.oracle.graal.python.builtins.objects.tuple.PTuple;
|
62 | 64 | import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
|
63 | 65 | import com.oracle.graal.python.nodes.function.PythonBuiltinNode;
|
|
69 | 71 | import com.oracle.truffle.api.dsl.GenerateNodeFactory;
|
70 | 72 | import com.oracle.truffle.api.dsl.NodeFactory;
|
71 | 73 | import com.oracle.truffle.api.dsl.Specialization;
|
72 |
| -import com.oracle.truffle.api.frame.VirtualFrame; |
73 | 74 |
|
74 | 75 | @CoreFunctions(extendClasses = PythonBuiltinClassType.PSocket)
|
75 | 76 | @SuppressWarnings("unused")
|
@@ -158,7 +159,7 @@ else if (socket.getServerSocket() != null) {
|
158 | 159 | throw raise(PythonBuiltinClassType.OSError, "Bad file descriptor");
|
159 | 160 | }
|
160 | 161 | }
|
161 |
| - getContext().getResources().closeSocket(socket.getFileno()); |
| 162 | + getContext().getResources().close(socket.getFileno()); |
162 | 163 | return PNone.NONE;
|
163 | 164 | }
|
164 | 165 | }
|
|
0 commit comments